Repository navigation
feat: add matched-cashflow DCA benchmark and SMA regime evaluator - #822
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed03133d6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
AI Code Review (gemini /
|
AI assistance
Antigravity AI assistant authored the offline matched-cashflow DCA benchmark and SMA hysteresis regime module plus unit tests.
What changed
src/quant_platform_kit/risk/benchmark_dca_and_regime.pyand re-exported its symbols fromsrc/quant_platform_kit/risk/__init__.py:evaluate_matched_cashflow_dca_benchmark: compares realized portfolio equity against matched external cash-flow passive DCA (SPY/QQQ/ arbitrary benchmark symbols) with configurable one-way cost in bps.evaluate_sma_hysteresis_regime: causalSMA ± hysteresis_bandregime switch that strictly enforces0 <= risk_off_multiplier <= risk_on_multiplier <= 1.0and fails closed on insufficient history or invalid prices.tests/test_benchmark_dca_and_regime.py.How verified
uv run pytest tests/test_benchmark_dca_and_regime.py tests/test_twr_capital_ladder.py -quv run ruff check src/quant_platform_kit/risk/benchmark_dca_and_regime.py src/quant_platform_kit/risk/__init__.py tests/test_benchmark_dca_and_regime.pyWhy
Provides standardized offline evaluators so pilot/paper reports can measure exact alpha against matched-cashflow index DCA benchmarks and apply a bounded
<= 1.0L4 regime filter without touching broker or order paths.Risk
Low risk: strictly offline, pure computation module under
quant_platform_kit.riskwith no broker calls, network I/O, or runtime side effects.